<?php echo $this->Section->main(); ?>
<body>
<div class="container_4">

	<div class="grid_1">
		<div class="logo"><?php echo $this->Html->link($this->Html->image(HOST.'/seo.pzco.logo.png'),'/',array('escape'=>false));?></a></div>
	</div>
	<?php echo $this->element('aktualnosci-promocje')?>
	
	<div class="grid_3">
		
	</div>
	
	<div class="clear"> </div>
	
	<div class="grid_4">
		<?php echo $this->element('menu-top')?>
		<div class="clear"> </div>
	</div>
		
	<div class="clear"> </div>
	
	<div class="grid_4 header">
		<?php echo $this->element('baner')?>
		<div class="clear"> </div>
	</div>	
	
	<div class="clear"> </div>
	<div class="content">
		<div class="grid_1 white">
			<div class="left-text-content">				
				<h2><?php echo __('Kategorie',true)?></h2>
				<div id="news-index-header">
					<div id="categories">
						<ul>
						<?php foreach ($newsGroups as $id => $name) {?>
			            	<li>
			            		<h3>
			            			<?php echo $html->link($name,array('plugin'=>'calendar','controller'=>'news','action'=>'display',$id),array('class'=>(($id == $selectedNewsGroups) ? 'sectionFilter active' : 'sectionFilter')))?>
				           		</h3>
			            	</li>
			            <?php }?>
			        	</ul>
				        <div class="clear"></div>
				    </div>				    
				</div>
			</div>
			<div class="clear"> </div>
			
					
			<div class="left-text-content"><?php echo $this->Section->generate(1,'calendar-title');?>
				<div id="calendar">&nbsp;</div>
			</div>
			<div class="clear"> </div>
		</div>
		
		<div class="grid_3 white">
			<div class="right-text-content">
				
				<div class="article-text">
					<div class="title">
						<h2><?php echo $news['News']['name']; ?></h2>
					</div>                    
					<div class="description">
					</div>
					<div class="content-small"><em><?php echo $news['News']['small_content']?></em></div>
					<div class="text">
						<?php echo $fileUpload->image($news['NewUpload']['name'],array('autoResize'=>true,'width'=>300,'imagePathOnly'=>false,'style'=>'float: left; padding: 10px; margin: 10px;'));?>
					    <p><?php echo $news['News']['content']; ?></p>
					</div>
				</div> 	
				<?php if($session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'admin' || $session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'manag'){?>
				<?php $this->Footpanel->install();?>
				<div id="footpanel">
					<ul>
						<li><?php echo $this->Html->link(__('Home', true).'<small>'.__('Home', true).'</small>', array('plugin'=>'calendar','controller'=>'news','action'=>'display'),array('escape'=>false,'class'=>'home')); ?></li>
						<li><?php echo $this->Html->link(__('Add News', true).'<small>'.__('Add News', true).'</small>', 
							array('plugin'=>'calendar','controller'=>'news','action'=>'add'),
							array('escape'=>false,'style'=>'background-image: url(/img/firma/actions_16_add.png)','onclick'=>"return hs.htmlExpand(this, { objectType: 'iframe', width:860, height:700,title:'Dodaj' } )")); ?></li>					
						<li><?php echo $this->Html->link(__('Edit News', true).'<small>'.__('Edit News', true).'</small>', 
							array('plugin'=>'calendar','controller'=>'news','action'=>'edit',$news['News']['id']),
							array('escape'=>false,'style'=>'background-image: url(/img/firma/actions_16_edit.png)','onclick'=>"return hs.htmlExpand(this, { objectType: 'iframe', width:860, height:700,title:'Dodaj' } )")); ?></li>					
						<li><?php echo $this->Html->link(__('Delete News', true).'<small>'.__('Delete News', true).'</small>', 
							array('plugin'=>'calendar','controller'=>'news','action'=>'delete',$news['News']['id']),
							array('escape'=>false,'style'=>'background-image: url(/img/firma/actions_16_delete.png)'),sprintf(__('Are you sure you want to delete # %s?', true), $news['News']['name'])); ?></li>					
				
					</ul>
				</div>
				<?php }?>
							
			
				<div class="clear"> </div>
			</div>
			<div class="clear"> </div>
		</div>
		<div class="clear"> </div>
	</div>		
	<div class="clear"> </div>
	
	<?php echo $this->element('footer');?>
	<div class="clear"> </div>
</div>
<div class="clear"> </div>
</body>
